#!/bin/sh

adduser -S -s /dev/null -H -h %OPTWARE_TARGET_PREFIX%/share/clamav -D clamav

chown clamav:clamav %OPTWARE_TARGET_PREFIX%/share/clamav
chown clamav:clamav %OPTWARE_TARGET_PREFIX%/share/clamav/*

mkdir -p %OPTWARE_TARGET_PREFIX%/tmp
chmod 1777 %OPTWARE_TARGET_PREFIX%/tmp

mkdir -p %OPTWARE_TARGET_PREFIX%/var/log
chmod 755 %OPTWARE_TARGET_PREFIX%/var/log

touch %OPTWARE_TARGET_PREFIX%/var/log/freshclam.log
chown clamav:clamav %OPTWARE_TARGET_PREFIX%/var/log/freshclam.log 
